import { Divider } from 'antd'
import { fabric } from 'fabric'
import { useEffect } from 'react'

export default function View() {
  useEffect(() => {
    new fabric.Canvas('c', {
      width: 1000,
      height: 1000,
      isDrawingMode: true // 开启自由绘画模式
    })
  }, [])

  return (
    <div className='view-wrapper'>
      <Divider plain>自由绘画</Divider>
      <canvas id='c' style={{ border: '1px solid #ccc' }}></canvas>
    </div>
  )
}
